<table class='table table-striped'>
  <% if repo.rank %>
  <tr>
    <td>
      Sourcerank
    </td>
    <td>
      <strong><%= link_to repo.rank, repository_sourcerank_path(repo.to_param) %></strong>
    </td>
  </tr>
  <% end %>
  <% if repo.size %>
  <tr>
    <td>
      Repository Size
    </td>
    <td>
      <strong><%= number_to_human_size repo.size*1000 %></strong>
    </td>
  </tr>
  <% end %>
  <% if repo.stargazers_count %>
  <tr>
    <td>
      Stars
    </td>
    <td>
      <strong><%= link_to_unless repo.stargazers_url.nil?, number_with_delimiter(repo.stargazers_count || 0), repo.stargazers_url %></strong>
    </td>
  </tr>
  <% end %>
  <tr>
    <td>
      Forks
    </td>
    <td>
      <strong><%= link_to_unless repo.forks_url.nil?, number_with_delimiter(repo.forks_count || 0), repo.forks_url %></strong>
    </td>
  </tr>
  <% if repo.subscribers_count.present? %>
  <tr>
    <td>
      Watchers
    </td>
    <td>
      <strong><%= link_to_unless repo.watchers_url.nil?, number_with_delimiter(repo.subscribers_count), repo.watchers_url %></strong>
    </td>
  </tr>
  <% end %>
  <% if repo.open_issues_count %>
  <tr>
    <td>
      Open issues
    </td>
    <td>
      <strong><%= repo.has_issues? ? link_to(number_with_delimiter(repo.open_issues_count || 0), repo.issues_url) : 'disabled'  %></strong>
    </td>
  </tr>
  <% end %>
  <tr>
    <td>
      Dependencies
    </td>
    <td>
      <strong><%= number_with_delimiter repo.repository_dependencies.count %></strong>
    </td>
  </tr>
  <% if repo.contributions_count > 0 %>
  <tr>
    <td>
      Contributors
    </td>
    <td>
      <strong><%= link_to number_with_delimiter(repo.contributions_count), repository_contributors_path(@repository.to_param)  %></strong>
    </td>
  </tr>
  <% end %>
  <tr>
    <td>
      Tags
    </td>
    <td>
      <strong><%= link_to number_with_delimiter(repo.tags.count), repository_tags_path(@repository.to_param)  %></strong>
    </td>
  </tr>
  <tr>
    <td>
      Created
    </td>
    <td>
      <strong><%= timeago_tag repo.created_at %></strong>
    </td>
  </tr>
  <tr>
    <td>
      Last updated
    </td>
    <td>
      <strong><%= timeago_tag repo.updated_at %></strong>
    </td>
  </tr>
  <% if repo.host_type == 'GitHub' %>
  <tr>
    <td>
      Last pushed
    </td>
    <td>
      <strong><%= repo.pushed_at.present? ? timeago_tag(repo.pushed_at) : 'Never'  %></strong>
    </td>
  </tr>
  <% end %>
</table>
